home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_h.lzh / devices / conunit.h < prev    next >
C/C++ Source or Header  |  1991-03-14  |  3KB  |  103 lines

  1. #ifndef DEVICES_CONUNIT_H
  2. #define DEVICES_CONUNIT_H
  3. /*
  4. **    $Filename: devices/conunit.h $
  5. **    $Release: 2.04 $
  6. **    $Revision: 36.15 $
  7. **    $Date: 90/11/20 $
  8. **
  9. **    Console device unit definitions
  10. **
  11. **    (C) Copyright 1986,1987,1988,1989 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #ifndef    EXEC_TYPES_H
  16. #include    "exec/types.h"
  17. #endif
  18.  
  19. #ifndef EXEC_PORTS_H
  20. #include    "exec/ports.h"
  21. #endif
  22.  
  23. #ifndef DEVICES_CONSOLE_H
  24. #include    "devices/console.h"
  25. #endif
  26.  
  27. #ifndef DEVICES_KEYMAP_H
  28. #include    "devices/keymap.h"
  29. #endif
  30.  
  31. #ifndef DEVICES_INPUTEVENT_H
  32. #include    "devices/inputevent.h"
  33. #endif
  34.  
  35. /* ----    console unit numbers for OpenDevice() */
  36. #define    CONU_LIBRARY    -1    /* no unit, just fill in IO_DEVICE field */
  37. #define    CONU_STANDARD    0    /* standard unmapped console */
  38.  
  39. /* ---- New unit numbers for OpenDevice() - (V36) */
  40.  
  41. #define    CONU_CHARMAP    1    /* bind character map to console */
  42. #define    CONU_SNIPMAP    3    /* bind character map w/ snip to console */
  43.  
  44. /* ---- New flag defines for OpenDevice() - (V37) */
  45.  
  46. #define CONFLAG_DEFAULT            0
  47. #define CONFLAG_NODRAW_ON_NEWSIZE    1
  48.  
  49.  
  50. #define    PMB_ASM        (M_LNM+1)    /* internal storage bit for AS flag */
  51. #define    PMB_AWM        (PMB_ASM+1)    /* internal storage bit for AW flag */
  52. #define    MAXTABS        80
  53.  
  54.  
  55. struct    ConUnit {
  56.     struct  MsgPort cu_MP;
  57.     /* ---- read only variables */
  58.     struct  Window *cu_Window;    /* intuition window bound to this unit */
  59.     WORD    cu_XCP;        /* character position */
  60.     WORD    cu_YCP;
  61.     WORD    cu_XMax;        /* max character position */
  62.     WORD    cu_YMax;
  63.     WORD    cu_XRSize;        /* character raster size */
  64.     WORD    cu_YRSize;
  65.     WORD    cu_XROrigin;    /* raster origin */
  66.     WORD    cu_YROrigin;
  67.     WORD    cu_XRExtant;    /* raster maxima */
  68.     WORD    cu_YRExtant;
  69.     WORD    cu_XMinShrink;    /* smallest area intact from resize process */
  70.     WORD    cu_YMinShrink;
  71.     WORD    cu_XCCP;        /* cursor position */
  72.     WORD    cu_YCCP;
  73.  
  74.     /* ---- read/write variables (writes must must be protected) */
  75.     /* ---- storage for AskKeyMap and SetKeyMap */
  76.     struct  KeyMap cu_KeyMapStruct;
  77.     /* ---- tab stops */
  78.     UWORD   cu_TabStops[MAXTABS]; /* 0 at start, 0xffff at end of list */
  79.  
  80.     /* ---- console rastport attributes */
  81.     BYTE    cu_Mask;
  82.     BYTE    cu_FgPen;
  83.     BYTE    cu_BgPen;
  84.     BYTE    cu_AOLPen;
  85.     BYTE    cu_DrawMode;
  86.     BYTE    cu_Obsolete1;    /* was cu_AreaPtSz -- not used in V36 */
  87.     APTR    cu_Obsolete2;    /* was cu_AreaPtrn -- not used in V36 */
  88.     UBYTE   cu_Minterms[8];    /* console minterms */
  89.     struct  TextFont *cu_Font;
  90.     UBYTE   cu_AlgoStyle;
  91.     UBYTE   cu_TxFlags;
  92.     UWORD   cu_TxHeight;
  93.     UWORD   cu_TxWidth;
  94.     UWORD   cu_TxBaseline;
  95.     WORD    cu_TxSpacing;
  96.  
  97.     /* ---- console MODES and RAW EVENTS switches */
  98.     UBYTE   cu_Modes[(PMB_AWM+7)/8];    /* one bit per mode */
  99.     UBYTE   cu_RawEvents[(IECLASS_MAX+8)/8];
  100. };
  101.  
  102. #endif    /* DEVICES_CONUNIT_H */
  103.